#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: lru_learn.py 
@version:
@time: 2023/04/28 
"""
from functools import lru_cache


@lru_cache
def test(a, b):
    print('开始计算a+b的值...')
    return a + b


print(test(1, 2))
print(test(1, 2))
"""
开始计算a+b的值...
1+2等于: 3
1+2等于: 3


可以看到方法只被执行了一遍
"""
